﻿namespace HRM.CORE
{
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;
    using HRM.CORE;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms; using Common;

    public class xfmWelfare : Form
    {
        private bool _search;
        private IContainer components;
        private HRM.CORE.xucWelfare xucWelfare;

        public event ItemSelectedEventHander ItemSelected;

        public xfmWelfare()
        {
            this.components = null;
            this._search = false;
            this.InitializeComponent();
            this.Init();
        }

        public xfmWelfare(bool search)
        {
            this.components = null;
            this._search = false;
            this._search = search;
            this.InitializeComponent();
            this.Init();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Init()
        {
            SYS_LOG.Insert("Danh S\x00e1ch Ph\x00f2ng Ban", "Xem");
            this.xucWelfare = new HRM.CORE.xucWelfare();
            base.Controls.Add(this.xucWelfare);
            this.xucWelfare.Dock = DockStyle.Fill;
            this.xucWelfare.CloseClick += new ButtonClickEventHander(this.xucWelfare_CloseClick);
            this.Text = (SysOption.Language == "EN") ? "Welfare" : this.Text;
        }

        private void InitializeComponent()
        {
            base.SuspendLayout();
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(0x2bb, 0x218);
            base.Name = "xfmWelfare";
            this.Text = "Chương Tr\x00ecnh Ph\x00fac Lợi";
            base.ResumeLayout(false);
        }

        private void RaiseItemSelectedEventHander(HRM_WELFARE item)
        {
            if (this.ItemSelected != null)
            {
                this.ItemSelected(this, item);
            }
        }

        private void xucWelfare_CloseClick(object sender)
        {
            base.Close();
        }

        public bool IsSearch
        {
            set
            {
                this.xucWelfare.IsSearch = value;
            }
        }

        public delegate void ItemSelectedEventHander(object sender, HRM_WELFARE item);
    }
}

